<?php
declare(strict_types=1);
/**
 * MineAdmin is committed to providing solutions for quickly building web applications
 * Please view the LICENSE file that was distributed with this source code,
 * For the full copyright and license information.
 * Thank you very much for using MineAdmin.
 *
 * @Author X.Mo<root@imoi.cn>
 * @Link   https://gitee.com/xmo/MineAdmin
 */
namespace App\Wxc\Request;

use Mine\MineFormRequest;

/**
 * 享员申请单验证数据类
 */
class WxcSharerFormRequest extends MineFormRequest
{
    /**
     * 公共规则
     */
    public function commonRules(): array
    {
        return [];
    }

    
    /**
     * 新增数据验证规则
     * return array
     */
    public function saveRules(): array
    {
        return [
            //状态。0：待处理；200：审核通过；255：审核不通过 验证
            'status' => 'required',
            //原因 验证
            'reason' => 'required',
            // 验证
            'site_id' => 'required',
            //视频号小店appid 验证
            'app_id' => 'required',
            //分享员助手小程序用户openid 验证
            'openid' => 'required',
            //申请人手机号 验证
            'mobile_number' => 'required',
            //昵称 验证
            'nickname' => 'required',
            //头像url 验证
            'avatar' => 'required',

        ];
    }
    /**
     * 更新数据验证规则
     * return array
     */
    public function updateRules(): array
    {
        return [
            //状态。0：待处理；200：审核通过；255：审核不通过 验证
            'status' => 'required',
            //原因 验证
            'reason' => 'required',
            // 验证
            'site_id' => 'required',
            //视频号小店appid 验证
            'app_id' => 'required',
            //分享员助手小程序用户openid 验证
            'openid' => 'required',
            //申请人手机号 验证
            'mobile_number' => 'required',
            //昵称 验证
            'nickname' => 'required',
            //头像url 验证
            'avatar' => 'required',

        ];
    }

    
    /**
     * 字段映射名称
     * return array
     */
    public function attributes(): array
    {
        return [
            'form_id' => '申请单ID',
            'status' => '状态。0：待处理；200：审核通过；255：审核不通过',
            'reason' => '原因',
            'site_id' => '',
            'app_id' => '视频号小店appid',
            'openid' => '分享员助手小程序用户openid',
            'mobile_number' => '申请人手机号',
            'nickname' => '昵称',
            'avatar' => '头像url',
            'created_at' => '提交时间',
            'updated_at' => '更新时间',

        ];
    }

}